package com.laker.autotest;

import cn.hutool.extra.spring.EnableSpringUtil;
import com.laker.autotest.common.utils.TestNGUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableSpringUtil
@EnableScheduling
@Slf4j
public class AutoDesktopTestApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(AutoDesktopTestApplication.class, args);
        try {
            TestNGUtil.runWithTestNgXmlPath();
        } finally {
            log.info("Tests completed, shutting down application...");
            SpringApplication.exit(applicationContext);
        }
    }
}